package com.fm.webrtc.modle;

import org.webrtc.AudioTrack;
import org.webrtc.VideoTrack;

/**
 * 流信息数据
 */
public class StreamModel {

    /**
     * 用户的 唯一id
     */
    private String peerId;

    /**
     *  consume 对应的 id
     */
    private String vid;

    public String getVStreamId() {
        return vStreamId;
    }

    public void setVStreamId(String vStreamId) {
        this.vStreamId = vStreamId;
    }

    public String getAStreamId() {
        return aStreamId;
    }

    public void setAStreamId(String aStreamId) {
        this.aStreamId = aStreamId;
    }

    /**
     * webrtc 对应 流id
     */
    private String vStreamId; //webrtc 里面 流id
    /**
     * 视频流信息
     */
    private VideoTrack videoTrack;

    /**
     * consume 对应的 音频id
     */
    private String aid;
    /**
     *  webrtc 对应 音频流id
     */
    private String aStreamId;
    /**
     * 音频流信息
     */
    private AudioTrack audioTrack;

    public boolean isVPause() {
        return vPause;
    }

    public void setVPause(boolean vPause) {
        this.vPause = vPause;
    }

    public boolean isAPause() {
        return aPause;
    }

    public void setAPause(boolean aPause) {
        this.aPause = aPause;
    }

    private boolean vPause = true;

    private boolean aPause = true;

    public StreamModel(String peerId, String vid, String aid, VideoTrack videoTrack, AudioTrack audioTrack) {
        this.peerId = peerId;
        this.vid = vid;
        this.aid = aid;
        this.videoTrack = videoTrack;
        this.audioTrack = audioTrack;
    }

    public StreamModel(String peerId) {
        this.peerId = peerId;
    }

    public StreamModel(String peerId, String aid, AudioTrack audioTrack) {
        this.peerId = peerId;
        this.aid = aid;
        this.audioTrack = audioTrack;
    }

    public StreamModel(String peerId, String vid, VideoTrack videoTrack) {
        this.peerId = peerId;
        this.vid = vid;
        this.videoTrack = videoTrack;
    }

    public String getPeerId() {
        return peerId;
    }

    public void setPeerId(String peerId) {
        this.peerId = peerId;
    }

    public String getVid() {
        return vid;
    }

    public void setVid(String vid) {
        this.vid = vid;
    }

    public String getAid() {
        return aid;
    }

    public void setAid(String aid) {
        this.aid = aid;
    }

    public StreamModel() {
    }




    public VideoTrack getVideoTrack() {
        return videoTrack;
    }

    public void setVideoTrack(VideoTrack videoTrack) {
        this.videoTrack = videoTrack;
    }

    public AudioTrack getAudioTrack() {
        return audioTrack;
    }

    public void setAudioTrack(AudioTrack audioTrack) {
        this.audioTrack = audioTrack;
    }

    @Override
    public String toString() {
        return "StreamModel{" +
                "peerId='" + peerId + '\'' +
                ", vid='" + vid + '\'' +
                ", vStreamId='" + vStreamId + '\'' +
                ", videoTrack=" + videoTrack +
                ", aid='" + aid + '\'' +
                ", aStreamId='" + aStreamId + '\'' +
                ", audioTrack=" + audioTrack +
                ", vPause=" + vPause +
                ", aPause=" + aPause +
                '}';
    }
}
